home *** CD-ROM | disk | FTP | other *** search
- // errorsource.h
-
- #ifndef errorsource_h
- #define errorsource_h
-
- #include <types.h>
-
- #ifndef inttypes_h
- #include "inttypes.h"
- #endif
-
- class errorsource
- {
- protected:
- OSErr error;
-
- public:
- errorsource() { error= noErr; }
-
- void clearerror() { error= noErr; }
-
- boolean iswrong() const { return error != noErr; }
- OSErr whatiswrong() const { return error; }
-
- void ignore(OSErr toignore) { if (error == toignore) clearerror(); }
- };
-
- #endif errorsource_h
-